import service from 'utils/axios';
import qs from 'qs'

export function getList(query) {
  return service.get(`/api/v1/staffs/${query.id}/trains/`, query);
}

export function getQues(query) {
  return service.get(`/api/v1/trains/${query.id}/`);
}

export function getMe() {
  return service.get('/api/v1/staffs/me/');
}

export function bind(query) {
  return service.post('/api/v1/staffs/bind/', query);
}

export function getStores(params) {
  return service.get('/api/v1/stores/', {
    params
  })
}
export function getRegion() {
  return service.get('/api/v1/region')
}
export function join(query) {
  return service.post(`/api/v1/trains/${query.id}/join/`)
}

export function success(query) {
  return service.post(`/api/v1/trains/${query.id}/success/`)
}

export function failure(query) {
  return service.post(`/api/v1/trains/${query.id}/failure/`)
}

export function trained(query) {
  return service.post(`/api/v1/trains/${query.id}/trained/`)
}